package com.topisv.tms.entity.taobao;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.topisv.tms.entity.ShopSource;
import com.topisv.tms.entity.work.WorkOrder;

public class TopWaybillNoGetDto implements Serializable {

	private static final long serialVersionUID = 1L;
	/** ShopSource,companyCode组成的map*/
	private Map<ShopSource, Map<String, List<WorkOrder>>> data = new HashMap<ShopSource, Map<String, List<WorkOrder>>>();

	public void add(WorkOrder order, ShopSource shopSource, String companyCode) {
		if (shopSource == null || shopSource.getTopisvSessionKey() == null) {
			return;
		}
		Map<String, List<WorkOrder>> map = data.get(shopSource);
		if (map == null) {
			map = new HashMap<String, List<WorkOrder>>();
			data.put(shopSource, map);
		}
		List<WorkOrder> orderList = map.get(companyCode);
		if (orderList == null) {
			orderList = new ArrayList<WorkOrder>();
			map.put(companyCode, orderList);
		}
		orderList.add(order);
	}
	public Map<ShopSource, Map<String, List<WorkOrder>>> getData() {
		return data;
	}
}
